package com.sinothk.file.preview.demo;

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View

import com.sinothk.file.preview.wps.WpsHelper;
import kotlinx.android.synthetic.main.demo_activity_main.*

public class DemoMainActivity : AppCompatActivity(), View.OnClickListener {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.demo_activity_main)

        wpsBtn.setOnClickListener(this)
        tbsBtn.setOnClickListener(this)
    }

    override fun onClick(v: View?) {
        when (v) {
            wpsBtn -> {
                startActivity(Intent(this, WpsDemoActivity::class.java))
            }
            tbsBtn -> {
                startActivity(Intent(this, TbsFilePreviewMainActivity::class.java))
            }
        }
    }

}
